The invention relates in general to a processor architecture and in particular to processing data of different data types in a processor.
In microprocessors there often exists the requirement to load, process, and store data of different data types. For many of these data types, there are conversion rules that enable one data type to be converted to another. It is often the case that the conversion in one direction does not entail any loss of information or accuracy, whereas conversion in the opposite direction is not possible without such loss. Examples include bit widths for integers, for example, 8 bit, 16 bit, 32 bit, and 64 bit.
When data is loaded into an arithmetic logic unit or register, a conversion occurs in many existing architectures to a data type into which generally all data types can be converted without loss of information or accuracy. For example, this may be a 64-bit number. While processing may be carried out on this general data type, there typically is a reconversion to a different data type for storage to ensure efficient utilization of the storage device.
When loading and storing of data are carried out, an access address is used to select directly or indirectly a memory cell through a memory device interface in which the desired data value is located or in which the data value is to be stored. Often, however, the bit width of the memory cell does not match that of the smallest data type but rather that of the largest data type to be able to load the latter as quickly as possible. For this reason, least significant bits (LSBs) are attached to the access addresses, these bits representing the subranges of the memory cells. During loading and storing, generally an additional logic is used for the extraction or reading of data or the writing of data to the correct position within the memory cell. Also, during writing the other, non-written bits within a memory cell are not overwritten. Generally, this is achieved using a write mask in which the bits to be changed within the memory cell are set to logical “1”. Alternatively, a plurality of memories having the size of the smallest data type can also be used to which the same access address and corresponding part of the datum is applied, and only the required memories are activated by a write-enable signal.
In the prior art, the information as to which data type is being loaded/stored is contained or encoded in the instruction word that controls the loading operation. The instruction words are that part of the machine language of a processor which indicates what type of instruction is involved, for example, addition, subtraction, or jump.
A disadvantage of this method is that the encoding of the data type in the instruction word enlarges the required program memory. Alternatively, given a fixed bit width for the instruction words the method assigns bits that otherwise could be utilized for encoding other control information.
Another disadvantage of this method is that the algorithm which describes the data processing must be stored explicitly for each data type. This also enlarges the required program memory. In addition, the required assembler syntax becomes less intuitive such that operations which implement identical content are described differently in terms of the given data type.
In SIMD (Single Instruction/Multiple Data) processors, during signal processing, identical operations are often implemented by different parallel arithmetic logic units using different data. For example, in an image processing operation an IDCT (Inverse Discrete Cosine Transform) transform is implemented for blocks of an image during MPEG (Moving Picture Experts Group) video encoding. To accelerate these operations on one processor, SIMD operations are defined such that their decoding results in identical operations within multiple arithmetic/logic units (ALUs). In audio processing, increasing use is being made of Dual-MAC (Multiply/Accumulate) units to process audio data. This approach exploits the fact that standard algorithms for a left channel and right channel of audio data are normally identical, while only the individual input data differ.
A SIMD processor is generally known having an architecture with at least two arithmetic/logic units to implement data processing, a data memory arrangement or a memory device interface to a memory arrangement to store data of different data types, an addressing unit to generate access addresses for the data to be stored in the data memory arrangement, and an address memory arrangement to store access or base addresses. In this type of processor architecture, the data of different data types are stored in the data memory arrangement independently of the given data type. An access address for a given memory area is assigned to the data for storage. To process the data, the data are retrieved from the data memory arrangement and applied to one of the arithmetic/logic units. Intermediate storage of the data in a register can occur.
The number of parallel units utilized, or the utilized bit width of the operands in these processors, is encoded in the instruction words. For example, in processors intended for image processing the selected processing can be between 4×8 bit×8 bit, 2×16 bit×16 bit, or 1×32 bit×32 bit. In audio signal processing, it is often possible to trigger dual MAC instructions. However, this is generally explicit from the instruction word. As a result, even in this case the above-described disadvantages still result by encoding the data type in the instruction.
As evident from above, a data type means not only information as to whether what is involved is, for example, integer data or floating-point data as a specific mathematical data type, but additionally or alternatively also information as to whether, in the case, for example, of audio data, what is involved is stereo data or mono data. The term “data type” is therefore understood not only in the purely mathematical sense but it also comprises an assignment of given data to certain specific applications of the data. The term “data type” also refers to an assignment of different bit widths.
What is needed is a simplification, in a SIMD processor architecture or in a method of processing data of different data types, of the handling of data of different data types and their distribution to or from arithmetic units within a SIMD processor architecture. In particular, what is needed is a simplification of the instruction words and the achievement of formulating an algorithm in machine language independently of data type.